package com.example.demo.mapper;

import com.example.demo.entity.Room;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoomMapper extends JpaRepository<Room, String> {
    @Query(name="findAllByOrder",nativeQuery = true,value="select * from room order by rname")
    List<Room> findAllByOrder();
}
